package com.cn.study.controller;

import com.cn.study.service.VxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mjy
 * @date 2021/10/12
 * @description
 */
@RestController
@RequestMapping("/vx")
public class VxController {


    @Autowired
    private VxService vxService;

    @PostMapping("/cs")
//    @GlobalTransactional(name = "cs",rollbackFor = Exception.class)
    public String cx(@RequestBody String cs) {
        Integer rest = vxService.insert(cs);
        return rest>0?"SUCCESS":"fail";
    }


}
